<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Concurrent Programming: parser.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Concurrent Programming
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">parser.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="parser_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00004"></a>00004 <span class="preprocessor">#ifndef PARSER_H</span>
<a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define PARSER_H</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;time.h&gt;</span>
<a name="l00011"></a>00011 
<a name="l00012"></a><a class="code" href="structrun_time.html">00012</a> <span class="keyword">struct </span><a class="code" href="structrun_time.html">runTime</a>
<a name="l00013"></a>00013 {
<a name="l00014"></a>00014     <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> palindromes;
<a name="l00015"></a>00015     <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> primes;
<a name="l00016"></a>00016 };
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 
<a name="l00025"></a>00025 <span class="keywordtype">void</span> distributed_phrase(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[]);
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 
<a name="l00034"></a>00034 <span class="keywordtype">void</span> distributed_word(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[]);
<a name="l00035"></a>00035 
<a name="l00044"></a>00044 <span class="keyword">static</span> <span class="keywordtype">int</span> parser(<span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> begin, <span class="keywordtype">int</span> length, <span class="keyword">struct</span> <a class="code" href="structrun_time.html">runTime</a> *);
<a name="l00045"></a>00045 
<a name="l00052"></a>00052 <span class="keywordtype">char</span> * fillBuffer(<span class="keywordtype">int</span> *length,<span class="keywordtype">char</span> *fileName);
<a name="l00053"></a>00053 
<a name="l00061"></a>00061 <span class="keywordtype">int</span> processWord(<span class="keywordtype">char</span> * buffer, <span class="keywordtype">int</span> begin, <span class="keywordtype">int</span> end);
<a name="l00062"></a>00062 
<a name="l00068"></a>00068 <span class="keyword">static</span> <span class="keywordtype">int</span> isLetter(<span class="keywordtype">char</span> ch);
<a name="l00069"></a>00069 
<a name="l00075"></a>00075 <span class="keyword">static</span> <span class="keywordtype">int</span> isNumber(<span class="keywordtype">char</span>);
<a name="l00076"></a>00076 
<a name="l00082"></a>00082 <span class="keyword">static</span> <span class="keywordtype">char</span> toUpperCase(<span class="keywordtype">char</span> ch);
<a name="l00083"></a>00083 
<a name="l00084"></a>00084 
<a name="l00090"></a>00090 <span class="keyword">static</span> <span class="keywordtype">int</span> isAlpha(<span class="keywordtype">char</span>);
<a name="l00091"></a>00091 
<a name="l00100"></a>00100 <span class="keywordtype">int</span> parserPhrase(<span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> begin, <span class="keywordtype">int</span> length, <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> *timeElapsed);
<a name="l00101"></a>00101 
<a name="l00109"></a>00109 <span class="keywordtype">int</span> processPhrase(<span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> begin, <span class="keywordtype">int</span> end);
<a name="l00110"></a>00110 
<a name="l00116"></a>00116 <span class="keywordtype">int</span> isTermCh(<span class="keywordtype">char</span> ch);
<a name="l00117"></a>00117 
<a name="l00118"></a>00118 
<a name="l00126"></a>00126 <span class="keywordtype">int</span> sumCh(<span class="keywordtype">char</span> *, <span class="keywordtype">int</span> begin, <span class="keywordtype">int</span> end);
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 
<a name="l00135"></a>00135 <span class="keywordtype">void</span> time_sub(<span class="keyword">struct</span> timeval *result, <span class="keyword">struct</span> timeval *t2, <span class="keyword">struct</span> timeval *t1);
<a name="l00136"></a>00136 
<a name="l00137"></a>00137 
<a name="l00143"></a>00143 <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> tolld(<span class="keyword">struct</span> timeval *);
<a name="l00144"></a>00144 
<a name="l00145"></a>00145 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Sun May 6 2012 15:09:38 for Concurrent Programming by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
